{template Public:Page:header}
<div class="container">
  <div class="row"> 
  {template Member:Index:sidebar}
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
        <div class="well">
          <h3>联系方式</h3>
          <hr />
          

          <form data-bv-feedbackicons-validating="glyphicon glyphicon-refresh" data-bv-feedbackicons-invalid="glyphicon glyphicon-remove" data-bv-feedbackicons-valid="glyphicon glyphicon-ok" class="form-horizontal bv-form" method="post" id="Form" novalidate="novalidate">
       
        
      	<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">电子邮箱：</label>
               <div class="col-lg-5"> 
             	{if !empty($member['email'])}{php}$emailarr=explode('@',$member['email']);{/php}{echo str_replace(substr($member['email'],0,3),'***',$emailarr[0])}@{echo $emailarr[1]} <a href="">修改</a>{else}<a href="">新认证</a>{/if}
               </div>
        </div>  
        

     	<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">手机号码：</label>
               <div class="col-lg-5"> 
               <input type="text" name="mobile" value="{if !empty($member['mobile'])}{echo $member['mobile']}{/if}" class="form-control" placeholder="手机">
               </div>
               <div class="col-lg-2"><a href="">认证</a></div>
        </div>  

        
		<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">固定电话：</label>
               <div class="col-lg-5"> 
               <div class="row">
                <div class="col-lg-4"><input type="text" name="area" value="{if !empty($member['area'])}{echo $member['area']}{/if}" class="form-control" placeholder="区号"></div>
                <div class="col-lg-8"><input type="text" name="phone" value="{if !empty($member['phone'])}{echo $member['phone']}{/if}" class="form-control" placeholder="电话"></div>
                </div>
               </div>
        </div>  
        
            
		<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">QQ：</label>
               <div class="col-lg-5"> 
               <input type="text" name="qq" value="{if !empty($member['qq'])}{echo $member['qq']}{/if}" class="form-control" placeholder="QQ号码">
               </div>
        </div>   
        
      	<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">所在地：</label>
               <div class="col-lg-8"> 
		<script type="text/javascript" src="{echo AURL}/js/jquery_cityselect.js"></script><script type="text/javascript" src="{echo AURL}/js/foxphp_json_city.js"></script>

            <div class="input-group" id="city_1">					  
                            <select class="prov"></select> 
                            <select class="city" disabled="disabled"></select>
                            <select class="dist" disabled="disabled"></select>
            </div>

						
						
		<script type="text/javascript">$(function(){$("#city_1").citySelect({prov:$("#ProvId").val(),city:$("#CityId").val(),dist:$("#DistId").val(),nodata:"none"});});</script>
        <input type="hidden" id="ProvId" name="provid" AUTOCOMPLETE="off"  value="{if !empty($member["provid"])}{echo $member["provid"]}{else}1{/if}">
        <input type="hidden" id="CityId" name="cityid" AUTOCOMPLETE="off"  value="{if !empty($member["cityid"])}{echo $member["cityid"]}{else}37{/if}">
        <input type="hidden" id="DistId" name="distid" AUTOCOMPLETE="off"  value="{if !empty($member["distid"])}{echo $member["distid"]}{else}567{/if}">
               </div>
        </div>  
        
        
    	<div class="form-group has-feedback">
               <label class="col-lg-2 control-label">详细地址：</label>
               <div class="col-lg-5"> 
               <input type="text" name="address" value="{if !empty($member['address'])}{echo $member['address']}{/if}" class="form-control" placeholder="详细地址">
               </div>
        </div> 
        
		<div class="form-group has-feedback">
               <div class="col-lg-offset-2 col-lg-5">
               	<button class="btn btn-success" type="submit">保 存</button>
               </div>
            </div>

          <input type="hidden" name="datatype" value="json"/>
          <input type="hidden" name="Submit" value="true"/>
           
          </form>
          
        </div>
      </div>
    </div>
  </div>
</div>




<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<!--Bootstrap Date Picker-->
<script src="{echo AURL}/js/datetime/bootstrap-datepicker-{echo C('DEFAULT_LANG')}.js"></script>
<script>

        $(document).ready(function () {
		   
		   $('.date-picker').datepicker();

 		  $('#Form').bootstrapValidator({
                excluded: [':disabled'],
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
				fields: {
					mobile: {
						validators: {
							regexp: {
								regexp: /^[0-9]+$/,
								message: '手机格式有误！'
							}
						}
					},
					area: {
						validators: {
							regexp: {
								regexp: /^[0-9]+$/,
								message: '区号格式有误！'
							}
						}
					},
					phone: {
						validators: {
							regexp: {
								regexp: /^[0-9]+$/,
								message: '电话格式有误！'
							}
						}
					},
					qq: {
						validators: {
							regexp: {
								regexp: /^[0-9]+$/,
								message: 'QQ号码格式有误！'
							}
						}
					}
				},
                submitHandler: function (form) {
			
				  $.post('{echo U("/post/member/contact")}',$("#Form").serialize(), function(json) {
					
					  	$('.bootbox').PhpappProgress({json:json});

				 		return true;
					
				  }, 'json');
				  

				 bootbox.dialog({
					 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
					 title: '<i class="icon fa fa-retweet"></i> 提交中',
					 closeButton: false
				 }).PhpappProgress({time:2000});
			 
				  return false; 
				 
                } 
			
            }) 

        });
	   

</script>
{template Public:Page:footer}